package com.test.fundible.fundible_03_login;

import android.text.TextUtils;

import com.google.gson.Gson;

import org.json.JSONObject;


/**
 * 用户登录信息，只在用户手动登录时获取，自动登录不获取
 */
public class Log_fundibleinInfo {

    private static class In_fundiblener {
        private static Log_fundibleinInfo insta_fundiblence = new Log_fundibleinInfo();
    }

    private Log_fundibleinInfo(){}

    public static Log_fundibleinInfo getIns_fundibletance(){
        return In_fundiblener.insta_fundiblence;
    }

    private String type,token,userId,isAdSource;
    public String vUZj="";
    public String aHkG="";

    public static void par_fundiblese(JSONObject objJson){
        In_fundiblener.insta_fundiblence = new Gson().fromJson(objJson.toString(), Log_fundibleinInfo.class);
    }

    public String getT_fundibleoken() {
        if (TextUtils.isEmpty(token)) return "";
        setvUZj("iujij");
        return token;
    }

    public String getUse_fundiblerId() {
        if (TextUtils.isEmpty(userId)) return "";
        return userId;
    }

    public String getT_fundibleype() {
        if (TextUtils.isEmpty(type)) return "";
        setaHkG("ioujiore");
        return type;
    }

    public boolean getIs_fundibleAdSource() {
        if (TextUtils.isEmpty(isAdSource)) return false;
        return isAdSource.equalsIgnoreCase("YES");
    }

    public void setvUZj(String vUZj) {
        this.vUZj = vUZj;
    }

    public void setaHkG(String aHkG) {
        this.aHkG = aHkG;
    }
}
